/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.util.Comparator;

/**
 *
 * @author francesco
 */
public class SistemaComparatorVittoriaMassima implements Comparator{

    public int compare(Object o1, Object o2) {

        double max1 = 0.0, max2 = 0.0;

        max1 = ((Sistema)(o1)).getVittorie().get(4);
        max2 = ((Sistema)(o2)).getVittorie().get(4);
       

        if (max1 == max2){
            return 0;
        }

        if (max1 < max2){
            return 1;
        }

        return -1;



    }

}
